import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: ()=>import('../views/login.vue'),
    },
    {
      path: '/home',
      name: 'home',
      component: ()=>import('../views/home.vue'),
      redirect:'/home/educationMange/baseMaintain',
      children:[
        {
          path:'educationMange',
          name:'教育管理',
          children:[
            {
              path:'baseMaintain',
              name:'基础信息维护',
              component:()=>import('../views/education/baseMaintain.vue')
            },
            {
              path:'teacherManage',
              name:'教师管理',
              component:()=>import('../views/education/teacherManage.vue')
            },
            {
              path:'studentManage',
              name:'学生管理',
              component:()=>import('../views/education/studentManage.vue')
            },
            {
              path:'classManage',
              name:'班级管理',
              component:()=>import('../views/education/classManage.vue')
            },
            {
              path:'GradeMaintenance',
              name:'年级主任维护',
              component:()=>import('../views/education/GradeMaintenance.vue')
            },
            {
              path:'courseManage',
              name:'排课管理',
              component:()=>import('../views/education/courseManage.vue')
            },
          ]
        },
        {
          path:'shiftChange',
          name:'走班排课',
          children:[
            {
              path:'courseSelection',
              name:'选课设置',
              component:()=>import('../views/goCourse/courseSelection.vue')
            },
            {
              path:'classAllocation',
              name:'智能分班',
              component:()=>import('../views/goCourse/classAllocation.vue')
            },
            {
              path:'shiftChangeItem',
              name:'走班排课item',
              component:()=>import('../views/goCourse/shiftChangeItem.vue')
            }
          ]
        },
        {
          path:'prepareLessons',
          name:'备课管理',
          children:[
            {
              path:'PersonalLesson',
              name:'个人备课',
              component:()=>import('../views/PersonalLesson/PersonalLesson.vue')
            },
            {
              path:'lessonGroupManagement',
              name:'备课组管理',
              component:()=>import('../views/PersonalLesson/lessonGroupManagement.vue')
            },
            {
              path:'lessonExample',
              name:'备课示例',
              component:()=>import('../views/PersonalLesson/lessonExample.vue')
            }
          ]
        },
        {
          path:'jobManagement',
          name:'作业管理',
          children:[
            {
              path:'jobManageaItem',
              name:'作业管理item',
              component:()=>import('../views/jobManage/jobManageaItem.vue')
            },
            {
              path:'jobStatistics',
              name:'作业统计',
              component:()=>import('../views/jobManage/jobStatistics.vue')
            },
          ]
        },
        {
          path:'resourceManagement',
          name:'资源管理',
          children:[
            {
              path:'interTranscripts',
              name:'教学资源管理',
              component:()=>import('../views/resourceManage/interTranscripts.vue')
            },
            {
              path:'extraResources',
              name:'课外资源管理',
              component:()=>import('../views/resourceManage/extraResources.vue')
            },
            {
              path:'TypeManagement',
              name:'资源类型管理',
              component:()=>import('../views/resourceManage/TypeManagement.vue')
            },
          ]
        },
        {
          path:'configuration',
          name:'配置管理',
          children:[
            {
              path:'academicYear',
              name:'学年学科配置',
              component:()=>import('../views/configuration/academicYear.vue')
            },
            {
              path:'academicTerm',
              name:'学年学期配置',
              component:()=>import('../views/configuration/academicTerm.vue')
            },
            {
              path:'textbook',
              name:'教材管理配置',
              component:()=>import('../views/configuration/textbook.vue')
            },    
            {
              path:'textTemplate',
              name:'教案模板配置',
              component:()=>import('../views/configuration/textTemplate.vue')
            },
          ]
        }
      ]
    },
  ]
})

export default router
